<template>
  <div>
    <en-table-layout
      pagination
      :tableData="tableData"
      :loading="loading"
      @selection-change="handleSelectionChange">
      <div slot="toolbar" class="inner-toolbar">
        <div class="toolbar-btns">
          <el-button type="primary" @click="handleReview()">批量审核</el-button>
          <el-button type="primary" @click="handleMakeMoney()">批量打款</el-button>
          <el-button type="primary" @click="exportExcel">批量导出Excel</el-button>
          <el-button type="primary" @click="importExcel">批量导入转账信息</el-button>
        </div>
        <div class="toolbar-search">
          <en-table-search
            @search="searchEvent"
            @advancedSearch="advancedSearchEvent"
            advanced
            advancedWidth="480"
            placeholder="请输入用户名">
            <template slot="advanced-content">
              <el-form :model="advancedForm" :rules="advancedRules" label-width="75px" label-position="left" ref="advancedForm">
                <el-form-item prop="withdraw_no" label="流水号:">
                  <el-input v-model="advancedForm.withdraw_no" placeholder="请输入流水号" clearable></el-input>
                </el-form-item>
                <el-form-item prop="apply_time" label="提现时间:">
                  <el-date-picker
                    clearable
                    v-model="apply_time"
                    type="datetimerange"
                    align="center"
                    :editable="false"
                    unlink-panels
                    range-separator="至"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    :default-time="['00:00:00', '23:59:59']"
                    start-placeholder="开始时间"
                    end-placeholder="结束时间">
                  </el-date-picker>
                </el-form-item>
                <el-form-item prop="memberType" label="用户类型:">
                  <el-select v-model="advancedForm.member_type" placeholder="用户类型" clearable>
                    <el-option
                      label="【用户】"
                      value="【用户】"
                    ></el-option>
                    <el-option
                      label="【团长】"
                      value="【团长】"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item prop="member_name" label="用户名:">
                  <el-input v-model="advancedForm.member_name" placeholder="请输入用户名" clearable></el-input>
                </el-form-item>
                <el-form-item prop="withdraw_channel" label="收款方式:">
                  <el-select v-model="advancedForm.withdraw_channel" clearable placeholder="收款方式">
                    <el-option 
                    v-for="(item,index) in withdrawTypes" 
                    :key="index"
                    :label="item.label"
                    :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item prop="withdraw_channel" label="开户银行:">
                  <dg-select
                    dictType="bank_name"
                    clearable
                    placeholder="请选择开户银行"
                    v-model="advancedForm.bank_name"
                    :defaultValue="advancedForm.bank_name"
                    @change="advancedSearchEvent"
                  ></dg-select>
                </el-form-item>
                <el-form-item prop="member_name" label="收款账户:">
                  <el-input v-model="advancedForm.other_accountName" placeholder="请输入收款账户" clearable></el-input>
                </el-form-item>
                <el-form-item prop="member_name" label="收款账号:">
                  <el-input v-model="advancedForm.other_accountNo" placeholder="请输入收款账号" clearable></el-input>
                </el-form-item>
                <el-form-item prop="status" label="提现状态:">
                  <el-select v-model="advancedForm.status" placeholder="提现状态" clearable>
                    <el-option
                      v-for="(item,index) in withdrawState"
                      :key="index"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-form>
            </template>
          </en-table-search>
        </div>
      </div>
      <template slot="table-columns">
        <el-table-column type="selection" width="52" />
        <el-table-column prop="withdrawNo" label="流水号" min-witdh="140" />
        <el-table-column label="提现时间" min-witdh="280">
          <template slot-scope="scope">{{scope.row.applyTime}}</template>
        </el-table-column>
        <el-table-column label="提现金额" min-witdh="125">
          <template slot-scope="scope">{{ scope.row.amount | unitPrice('￥') }}</template>
        </el-table-column>
        <el-table-column label="用户名" min-witdh="150">
          <template slot-scope="{ row }">
            <span class="member-name"> {{ row.memberName }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="accountType" label="收款方式" min-witdh="140">
          <template
            slot-scope="scope"
          >{{ scope.row.withdrawChannel===1?'银行卡':scope.row.withdrawChannel===2?'支付宝':scope.row.withdrawChannel===3?'微信':'' }}</template>
        </el-table-column>
        <el-table-column prop="bankName" label="开户银行" min-witdh="150" />
        <el-table-column label="收款账户" min-witdh="150">
          <template
            slot-scope="scope"
          >{{ scope.row.withdrawChannel!==1?scope.row.otherAccountName:scope.row.openAccountName }}</template>
        </el-table-column>
        <el-table-column label="收款账号" min-witdh="150">
          <template
            slot-scope="scope"
          >{{ !scope.row.openAccountName ? scope.row.otherAccountNo:scope.row.cardNo }}</template>
        </el-table-column>
        <el-table-column label="提现状态" min-witdh="100">
          <template
            slot-scope="scope"
          >
            <div v-if="scope.row.status === -1">
              <span>提现失败</span><br>
              <span class="transfer_remark">{{scope.row.transferRemark}}</span>
            </div>
            <span v-if="scope.row.status === 0">提现中</span>
            <span v-if="scope.row.status === 1">审核通过</span>
            <span v-if="scope.row.status === 2">审核拒绝</span>
            <span v-if="scope.row.status === 3">提现成功</span>
            <span v-if="scope.row.status === 4">支付中</span>
          <!-- {{ scope.row.status === -1?'提现失败':scope.row.status===0?'提现中':scope.row.status===1?'审核通过':scope.row.status===2?'审核拒绝':scope.row.status===3?'提现成功':'' }} -->
          
          </template>
        </el-table-column>
        <el-table-column label="操作" width="80">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="primary"
              v-if="scope.row.status===0"
              @click="handleAudit(scope.row.id)"
            >审核</el-button>
            <el-button
              size="mini"
              type="primary"
              v-if="scope.row.status===1"
              @click="handleMoney(scope.row)"
            >打款</el-button>
          </template>
        </el-table-column>
      </template>
      <el-pagination
        slot="pagination"
        v-if="pageData"
        @size-change="handlePageSizeChange"
        @current-change="handlePageCurrentChange"
        :current-page="pageData.page_num"
        :page-sizes="[10, 20, 50, 100]"
        :page-size="pageData.page_size"
        layout="total, sizes, prev, pager, next, jumper"
        :total="pageData.data_total"
      ></el-pagination>
    </en-table-layout>

    <!--审核-->
    <el-dialog title="提现审核" width="420px" class="dialog-audit" :visible.sync="dialogAudit">
      <el-form :model="formAudit" :rules="auditRule" ref="formAudit" label-width="100px">
        <el-form-item label="审核结果:" prop="status" required>
          <el-radio-group v-model="formAudit.status">
            <el-radio label="1">审核通过</el-radio>
            <el-radio label="2">审核拒绝</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="原因:" prop="remark" required>
          <el-input type="textarea" rows="3" v-model="formAudit.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogAudit = false">取 消</el-button>
        <el-button type="primary" @click="submitAudit()">确 定</el-button>
      </div>
    </el-dialog>
    <!-- 批量审核 -->
    <el-dialog title="提示" width="500px" :visible.sync="dialogReview">
      <el-form :model="formReview" :rules="reviewRule" ref="formReview" label-width="100px">
        <el-form-item label="已选中条数:">
          <span class="select-option">{{multipleTion.length}}</span>条
        </el-form-item>
        <el-form-item label="请选择:" prop="status">
          <el-radio-group v-model="formReview.status">
            <el-radio :label="1">审核通过</el-radio>
            <el-radio :label="2">审核不通过</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="原因:" prop="remark">
          <el-input type="textarea" rows="3" v-model="formReview.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogReview = false">取 消</el-button>
        <el-button type="primary" @click="submit('formReview')">确 定</el-button>
      </div>
    </el-dialog>
    <!--批量打款 -->
    <el-dialog title="提示" width="500px" :visible.sync="dialogMakeMoney">
      <div>
          已选中条数:<span class="select-option">{{multipleTion.length === 0 ? '1' : multipleTion.length}}</span>条
      </div>
      <div class="make-money" v-if="removeMakeMoney">
        <div>确认打款后，将直接转账至用户微信钱包。</div>
        <div>是否确认打款？</div>
      </div>
      <div v-else>
        <div>打款后将不可撤销，请确认是否已线下打款成功。</div>
        <div>是否继续打款？</div>
      </div>
      <el-form :model="makeMoneyForm" :rules="makeMoneyFormRules" ref="makeMoneyForm" label-width="80px" style="padding-top:28px">
        <el-form-item label="备注:" prop="remark">
          <el-input type="textarea" rows="3" v-model="makeMoneyForm.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogMakeMoney = false">取 消</el-button>
        <el-button type="primary" @click="submitMakeMoney('makeMoneyForm')">确定打款</el-button>
      </div>
    </el-dialog>
    <!--批量打款 -->
    <el-dialog title="提示" width="500px" :visible.sync="dialogAliBankMakeMoney">
      <div>
          已选中条数:<span class="select-option">{{multipleTion.length === 0 ? '1' : multipleTion.length}}</span>条
      </div>
      <el-form :model="aliBankForm" :rules="AliBankFormRules" ref="AliBankForm" label-width="80px" style="padding-top:28px">
        <el-form-item label="请选择:" prop="submitType">
          <el-radio v-model="aliBankForm.submitType" :label="3">提现成功</el-radio>
          <el-radio v-model="aliBankForm.submitType" :label="-1">提现失败</el-radio>
        </el-form-item>
        <el-form-item label="备注:" prop="transfer_remark">
          <el-input type="textarea" rows="3" v-model="aliBankForm.transfer_remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogAliBankMakeMoney = false">取 消</el-button>
        <el-button type="primary" @click="submitAliBankMakeMoney('AliBankForm')">确定打款</el-button>
      </div>
    </el-dialog>
    <!-- 打款后提示的弹框 -->
    <el-dialog title="提示" width="500px" :visible.sync="wiseUpDialog">
      <el-form label-width="180px" class="makeMoney-content">
        <div v-for="(item,index) in makeMoneysError" :key='index'>
          <el-row :gutter="10" style="padding:10px">
            <el-col :span="24">
              流水号：{{item.withdraw_no}} 打款失败, 原因：<span class="select-option">{{item.withdraw_no}} {{item.transfer_remark}}</span>
            </el-col>
          </el-row>
        </div>
      </el-form>

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="wiseUp()">我知道了</el-button>
      </div>
    </el-dialog>
    <!-- 批量导出弹框  -->
    <el-dialog title="提示" width="500px" :visible.sync="dialogExport">
      <div>
        已批量选中
        <span class="select-option">{{multipleTion.length}}</span> 条
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogReview = false">取 消</el-button>
        <el-button type="primary" @click="submitExcel()">确 定 导 出</el-button>
      </div>
    </el-dialog>
    <!-- 批量导入 -->
    <el-dialog title="提示" width="500px" :visible.sync="dialogImport">
      <div class="upload-import">
        <el-upload
          class="upload-demo"
          drag
          action="https://jsonplaceholder.typicode.com/posts/"
          multiple
        >
          <i class="el-icon-upload"></i>
          <div class="el-upload__text">
            将文件拖到此处，或
            <em>点击上传</em>
          </div>
          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogReview = false">取 消</el-button>
        <el-button type="primary" @click="submitExcel()">确 定 导 入</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import * as API_assets from "@/api/assets";

let timeFlag = 1;
let timeI = 60;
export default {
  name: "assetsManage",
  data() {
    return {
      /** 列表loading状态 */
      loading: false,
      // 多选
      multipleChoice: [],
      /** 列表参数 */
      params: {
        page_num: 1,
        page_size: 10
      },

      /** 账单汇总 */
      accountData: {
        withdrawPrice: 0.0,
        outPrice: 0.0,
        noOutPrice: 0.0
      },

      /** 列表数据 */
      tableData: null,
      // 单已打款
      singleMoney: undefined,
      /** 列表分页数据 */
      pageData: null,

      /** 提现审核弹层 */
      dialogAudit: false,
      /** 批量导出 */
      ExportDialog: false,
      formAudit: {
        withdraw_bill_ids: undefined,
        status: undefined,
        remark: undefined
      },
      auditRule: {
        status: [
          { required: true, message: "请选择审核结果", trigger: "change" }
        ],
        remark: [
          { required: true, message: "请输入审核原因", trigger: "blur" }
        ]
      },
      makeMoneyFormRules: {
        remark: [
          { required: true, message: "请输入备注", trigger: "blur" }
        ]
      },
      AliBankFormRules: {
        submitType: [
          { required: true, message: "请选择提现状态", trigger: "blur" }
        ],
        transfer_remark: [
          { required: true, message: "请输入备注", trigger: "blur" }
        ]
      },
      // 选中多条
      multipleTion: [],
      makeMoneysError: [],
      // 高级搜索表单
      advancedForm: {
        withdraw_no: undefined,
        member_type: undefined,
        member_name: undefined,
        start_apply_time: undefined,
        end_apply_time: undefined,
        withdraw_channel: undefined,
        bank_name: undefined,
        other_account_name: undefined,
        other_account_no: undefined,
        status: undefined
      },
      apply_time: undefined,
      // 批量审核弹框
      dialogReview: false,
      // 批量导出弹框
      dialogExport: false,
      // 批量导入弹框
      dialogImport: false,
      // 批量打款弹框
      dialogMakeMoney: false,
      // 批量打款弹框-支付宝或银行打款
      dialogAliBankMakeMoney: false,
      // 我知道了弹框
      wiseUpDialog: false,
      // 批量审核表单
      formReview: {},
      // 批量打款提交
      formMakeMoney: {},
      // 批量打款表单
      aliBankForm: {
        submitType: undefined,
        remark: undefined
      },
      // 批量打款表单
      makeMoneyForm: {
        remark: undefined
      },
      // 批量审核表单验证
      reviewRule: {
        status: [
          {
            required: true,
            message: "请选择一项数据",
            trigger: "blur"
          }
        ],
        remark: [
          {
            required: true,
            message: "原因不能为空",
            trigger: "blur"
          }
        ]
      },
      advancedRules: {},
      // 用户类型下拉框数据
      userTypes: [
        {
          label: "团长",
          value: "团长"
        },
        {
          label: "商铺",
          value: "商铺"
        },
        {
          label: "用户",
          value: "用户"
        }
      ],
      submitType: null,
      // 收款方式下拉框
      paymentTypes: [
        {
          label: "银行卡",
          value: "银行卡"
        },
        {
          label: "支付宝",
          value: "支付宝"
        },
        {
          lable: "微信",
          value: "微信"
        }
      ],
      // 开户银行下拉框
      bankTypes: [
        {
          label: "中国银行",
          value: "中国银行"
        },
        {
          label: "建设银行",
          value: "建设银行"
        },
        {
          label: "浦发银行",
          value: "浦发银行"
        }
      ],
      // 提现状态下拉框
      withdrawState: [
        {
          label: "提现失败",
          value: "-1"
        },
        {
          label: "提现中",
          value: "0"
        },
        {
          label: "审核通过",
          value: "1"
        },
        {
          label: "审核拒绝",
          value: "2"
        },
        {
          label: "提现成功",
          value: "3"
        },
        {
          label: "支付中",
          value: "4"
        }
      ],
      withdrawTypes: [
        {
          label: '银行卡',
          value: '1'
        },
        {
          label: '支付宝',
          value: '2'
        },
        {
          label: '微信',
          value: '3'
        }
      ],
      removeMakeMoney: true
    };
  },
  mounted() {
    this.GET_ApplytList();
  },
  methods: {
    /**
     * @date 2020/09/02
     * @author kaiqiang
     * @description { 监听多选框选中事件 }
     */
    handleSelectionChange(event) {
      let array = [];
      for (let i in event) {
        array.push(event[i].id);
      }
      this.multipleTion = array;
      this.multipleChoice = event;
    },
    /**
     * @date 2020/09/02
     * @author kaiqiang
     * @description { 点击弹框判断他有没有选中数据 }
     */
    handleReview() {
      this.multipleTion.length === 0 ? this.$message.warning('您还没有选中任何数据哦!!!') : '';
      for (let item of this.multipleChoice) {
        if (item.status === 3) {
          this.$message({
            type: 'error',
            message: '已经提现成功的数据不能再次申请!!!'
          })
          return
        } else {
          this.dialogReview = true
        }
      }  
    },

    /** 搜索事件触发 */
    searchEvent(data) {
      if (data === '') {
        data = undefined
      }
      this.params = {
        ...this.params,
        body: {
          member_name: data
        }
      };
      this.params.page_num = 1;
      this.GET_ApplytList();
    },
    
    /**
     * @date 2020/09/02
     * @author kaiqiang
     * @description { 高级搜索事件 }
     */
    advancedSearchEvent() {
      if (this.apply_time && this.apply_time.length > 0) {
        this.advancedForm.start_apply_time = this.apply_time[0];
        this.advancedForm.end_apply_time = this.apply_time[1];
      }
      this.params = {
        ...this.params,
        body: {
          ...this.advancedForm
        }
      }
      this.params.page_num = 1;
      this.GET_ApplytList();
    },

    /** 状态格式化 */
    withDrawStatus(row) {
      switch (row.status) {
        case "FAIL_AUDITING":
          return "审核失败";
        case "VIA_AUDITING":
          return "审核通过";
        case "TRANSFER_ACCOUNTS":
          return "已转账";
        case "APPLY":
          return "申请中";
      }
    },

    /** 分页大小发生改变 */
    handlePageSizeChange(size) {
      this.params.page_size = size;
      this.GET_ApplytList();
    },

    /** 分页页数发生改变 */
    handlePageCurrentChange(page) {
      this.params.page_num = page;
      this.GET_ApplytList();
    },

    /** 获取提现申请列表 */
    GET_ApplytList() {
      this.loading = true;
      let _params = {
        body: {},
        ...this.params
      };
      API_assets.getSettleMentList(_params).then((response) => {
        this.loading = false;
        this.tableData = response.records;
        this.pageData = {
          page_num: response.page_num,
          page_size: response.page_size,
          data_total: response.total_count
        };
      });
    },

    /** 显示审核弹框 */
    handleAudit(_id) {
      this.dialogAudit = true;
      if (this.$refs["formAudit"] !== undefined) {
        this.$refs["formAudit"].resetFields();
      }
      this.formAudit.withdraw_bill_ids = _id;
    },
    /** 审核结果提交 */
    submitAudit() {
      this.$refs["formAudit"].validate((valid) => {
        if (valid) {
          this.loading = true;
          let _params = {
            ...this.formAudit
          };
          API_assets.withdrawAuditing(_params).then((response) => {
            if (response.code === 200) {
              this.dialogAudit = false;
              this.$message.success("审核完成！");
              this.GET_ApplytList();
            } else if (response.code === 601) {
              this.makeMoneysError = response.data;
              this.dialogAudit = false;
              this.wiseUpDialog = true;
            }
          });
          this.loading = false;
        }
      });
    },
    /**
      * @date 2020/09/12
      * @author kaiqiang
      * @description { 批量审核提交 }
    */
    submit(formReview) {
      this.$refs[formReview].validate(valide => {
        if (valide) {
          let _params = {
            'withdraw_bill_ids': this.multipleTion.toString(),
            'status': this.formReview.status,
            'remark': this.formReview.remark
          }
          API_assets.withdrawAuditing(_params).then((response) => {
            if (response.code === 200) {
              this.$message.success("批量审核完成！");
              this.GET_ApplytList();
              this.dialogReview = false;
            } else if (response.code === 601) {
              this.makeMoneysError = response.data;
              this.dialogMakeMoney = false;
              this.wiseUpDialog = true;
            }
          });
        }
      })
    },
    /**
      * @date 2021/01/12
      * @author luocheng
      * @description { 批量导出 }
    */
    exportExcel () {
      let _params = {
        body: {},
        ...this.params
      };
      API_assets.withdrawBillExport(_params).then(response => {
        // 处理返回的文件流
        let blob = new Blob([response], {
          type: 'application/vnd.ms-excel;charset=utf-8'
        });
        let date = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate();
        const fileName = date + name + '提现单.xlsx';
        if ('download' in document.createElement('a')) {
          // 非IE下载
          const elink = document.createElement('a');
          elink.download = fileName;
          elink.style.display = 'none';
          elink.href = URL.createObjectURL(blob);
          document.body.appendChild(elink);
          elink.click();
          URL.revokeObjectURL(elink.href); // 释放URL 对象
          document.body.removeChild(elink);
        } else {
          // IE10+下载
          navigator.msSaveBlob(blob, fileName);
        }
      }).catch((error) => {
        this.$message({
          type: 'error',
          message: error
        })
      })
    },
    /**
      * @date 2021/01/12
      * @author luocheng
      * @description { 批量导入 }
    */
    importExcel () {

    },
    /**
      * @date 2020/09/12
      * @author kaiqiang
      * @description { 批量打款 }
    */
    handleMakeMoney() {
      if (this.multipleTion.length === 0) {
        this.$message({
          type: 'warning',
          message: '请选择数据!!!'
        })
        return
      }
      for (let self of this.multipleChoice) {
        console.log(self)
        if (self.status !== 1) {
          this.$message({
            type: 'error',
            message: '只有审核通过了才能打款,提现成功后不能再做此操作!!!'
          })
          return
        }
      }
      let withdrawChannel = this.multipleChoice[0].withdrawChannel;
      for (let item of this.multipleChoice) {
        if (withdrawChannel !== item.withdrawChannel) {
          this.$message({
            type: 'error',
            message: '收款方式不一致!!!'
          })
          return
        }
      }
      if (withdrawChannel === 3) {
        this.dialogMakeMoney = true;
      } else if (withdrawChannel === 1 || withdrawChannel === 2) {
        this.dialogMakeMoney = true;
        this.removeMakeMoney = false;
      }
    },
    submitMakeMoney(formMakeMoney) {
      let _params = {
        'withdraw_bill_ids': this.multipleTion.toString() || this.singleMoney,
        'remark': this.makeMoneyForm.remark
      }
      this.$refs['makeMoneyForm'].validate((valide) => {
        if (valide) {
          API_assets.withdrawMarkTransfer(_params).then((response) => {
            if (response.code === 200) {
              this.$message.success(response.data);
              this.GET_ApplytList();
              this.dialogMakeMoney = false;
            } else if (response.code === 601) {
              this.makeMoneysError = response.data;
              this.dialogMakeMoney = false;
              this.wiseUpDialog = true;
            }
          }).catch((error) => {
            console.log(error)
          });
        }
      })
    },
    submitAliBankMakeMoney(AliBankForm) {
      let _params = {}
      if (AliBankForm === 'AliBankForm') {
        _params = {
          'withdraw_bill_ids': this.multipleTion.toString() || this.singleMoney,
          'status': this.aliBankForm.submitType,
          'transfer_remark': this.aliBankForm.transfer_remark
        }
      } else {
        _params = {
          'withdraw_bill_ids': this.multipleTion.toString() || this.singleMoney,
          'remark': this.makeMoneyForm.remark
        }
      }
      this.$refs[AliBankForm].validate((valide) => {
        if (valide) {
          API_assets.withdrawMarkTransfer(_params).then((response) => {
            if (response.code === 200) {
              this.$message.success(response.data);
              this.GET_ApplytList();
              this.dialogAliBankMakeMoney = false;
            } else if (response.code === 601) {
              this.makeMoneysError = response.data;
              this.dialogAliBankMakeMoney = false;
              this.wiseUpDialog = true;
            }
          }).catch((error) => {
            console.log(error)
          });
        }
      })
    },
    // 我知道了
    wiseUp() {
      this.wiseUpDialog = false;
      this.GET_ApplytList();
    },
    /** 显示确认转账弹框 */
    handleMoney(row) {
      this.singleMoney = row.id
      if (row.withdrawChannel === 1 || row.withdrawChannel === 2) {
        this.dialogAliBankMakeMoney = true;
        this.removeMakeMoney = false;
      } else {
        this.dialogMakeMoney = true;
        this.removeMakeMoney = true;
      }
    }
  }
};
</script>

<style type="text/scss" lang="scss" scoped>
.mb20 {
  margin-bottom: 20px !important;
}
h1 {
  padding-left: 10px;
  margin: 0 0 10px 0;
  border-left: solid 3px #28b779;
  color: #303133;
  font-size: 18px;
  font-weight: normal;
}
.count_row {
  padding: 5px 0;
  background: #fff;
  .count_cell {
    padding: 20px;
    .title {
      margin-bottom: 10px;
      font-size: 14px;
    }
    big {
      display: block;
      line-height: 28px;
      font-size: 28px;
    }
    .el-button {
      margin-top: 5px;
    }
  }
}
/** 工具条 */
// /deep/ div.toolbar {
//   display: none;
// }

/deep/ .el-table td:not(.is-left) {
  text-align: center;
}

.inner-toolbar {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 0 20px;
  .toolbar-btns {
    width: 100%;
    .el-button + .el-button {
      margin-left: 5px;
    }
  }
}

.goods-image {
  width: 50px;
  height: 50px;
}

/deep/ .dialog-withdrawal {
  .el-dialog__body {
    padding-bottom: 0;
    .el-input {
      &.is-disabled {
        .el-input__inner {
          color: #333;
        }
      }
    }
    .el-input-group__append {
      padding: 0;
      width: 110px;
      color: #fff;
      background-color: #409eff;
      border-color: #409eff;
      box-sizing: border-box;
      text-align: center;
      .el-button {
        padding-left: 0;
        padding-right: 0;
      }
    }
    .disabled_append {
      .el-input-group__append {
        background-color: #c8c9cc;
        border-color: #c8c9cc;
        .el-button {
          cursor: not-allowed;
        }
      }
    }
    .row_tips {
      color: #bcbcbc;
      font-size: 12px;
    }
  }
}

.select-option {
  color: #dc143c;
}

.input-timer {
  width: 100%;
}

.upload-import {
  text-align: center;
}

.make-money {
  margin-top: 20px;
  font-size: 16px;
}

.makeMoney-content {
  height: 200px;
  overflow: scroll;
}

.el-select {
  width: 100%;
}

.member-name {
  display: block;
  text-align: left;
}
.transfer_remark {
  color: #dc143c; 
  white-space: nowrap;
}
</style>


